home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / sysevent.z / sysevent
Encoding:
Text File  |  2002-10-03  |  12.0 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ssssyyyysssseeeevvvveeeennnntttt((((1111))))                                                        ssssyyyysssseeeevvvveeeennnntttt((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sysevent - System Log Event Capture System Daemon
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ssssyyyysssseeeevvvveeeennnntttt [----nnnn1111TTTT] [ ----ffff||||----FFFF syslog_pipe ] [ ----cccc config_file ]
  13.                    [ ----rrrr||||----RRRR reject_file ] [ ----tttt #threads ]
  14.                    [ ----EEEE regex_options] [ ----aaaa default_exec] [ ----AAAA default_dso]
  15.                 [ ----pppp #procs ]
  16.      ssssyyyysssseeeevvvveeeennnnttttFFFFiiiilllltttteeeerrrr
  17.      ssssyyyysssseeeevvvveeeennnntttt ----hhhh
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      _s_y_s_e_v_e_n_t capture messages generated from ssssyyyyssssllllooooggggdddd(1m) and, using rrrreeeeggggeeeexxxx(3g)
  21.      pattern stored in a configuration file, allow one or more  user-defined
  22.      action to be performed when a message match a given expression. ssssyyyysssseeeevvvveeeennnntttt
  23.      is multi-threaded. Someone may also want to use the -_T mode to remove
  24.      duplicates from the configuration file: the new configuration file will
  25.      go on standard output.
  26.  
  27.      ssssyyyysssseeeevvvveeeennnntttt capture syslogd-generated messages using syslog pipe file
  28.      mechanism.  By default, /tmp/.sysevent is used and /etc/syslog.conf need
  29.      the following entry:
  30.  
  31.           *.debug        @|/tmp/.sysevent
  32.  
  33.      SSSSPPPPEEEECCCCIIIIAAAALLLL CCCCAAAASSSSEEEE: If the second form is used ( _s_y_s_e_v_e_n_t_F_i_l_t_e_r ) or ----1111
  34.      command-line argument is used, _s_y_s_e_v_e_n_t will read one(1) line of data.
  35.      Using that form implies ----tttt 1111 and ----nnnn. This is is intended to be used in
  36.      /etc/syslog.conf like this:
  37.           *.debug        |/usr/sbin/syseventFilter     /var/adm/SYSLOG
  38.  
  39.           NNNNOOOOTTTTEEEE:::: For this special case only, if the configuration file
  40.      /etc/sysevent.config is missing, sysevent will silently exit and not
  41.      report any error message to syslogd.
  42.  
  43. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  44.      ----dddd   debug mode ( Imply ----nnnn ) . In debug mode, action are sent in
  45.           foreground.
  46.  
  47.      ----nnnn   no fork
  48.  
  49.      ----TTTT   test mode. If set. the config_file is checked against duplicates
  50.  
  51.      ----1111   Run once. _s_y_s_e_v_e_n_t will read one(1) line of data. Using that form
  52.           implies ----tttt 1111 and ----nnnn. This is is intended to be used in
  53.           /etc/syslog.conf like this:
  54.  
  55.                *.debug   |/usr/sbin/syseventFilter     /var/adm/SYSLOG
  56.  
  57.      ----ffff   syslog pipe specified in /etc/syslog.conf
  58.                    -f : named pipe ; -F : Unix Socket.
  59.                    Default: a named /tmp/.sysevent
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssyyyysssseeeevvvveeeennnntttt((((1111))))                                                        ssssyyyysssseeeevvvveeeennnntttt((((1111))))
  71.  
  72.  
  73.  
  74.      ----cccc   sysevent configuration file with up to 32768 entries.
  75.                    Default:/etc/sysevent.config
  76.  
  77.      ----rrrr   Collect unknown event to reject file.
  78.                    -r : overwrite. -R: append mode
  79.                    Default is : off
  80.  
  81.      ----tttt   # threads for regex analysis.Default:8
  82.  
  83.      ----EEEE   regcomp(3) compilation flag.
  84.                Default:0xb(REG_EXTENDED|REG_ICASE|REG_NOSUB)
  85.  
  86.      ----aaaa   default action exec file.       Default:/usr/local/bin/sysaction
  87.  
  88.      ----AAAA   default action dso  file.       Default:/usr/lib/libsysevent.so
  89.  
  90.      Note: SIGHUP : re-read configuration file
  91.  
  92.  
  93.  
  94. CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN FFFFIIIILLLLEEEE SSSSYYYYNNNNTTTTAAAAXXXX (((( ////eeeettttcccc////ssssyyyysssseeeevvvveeeennnntttt....ccccoooonnnnffffiiiigggg ))))
  95.      The configuration is read upon ssssyyyysssseeeevvvveeeennnntttt startup and re-read entirely when
  96.      it is modified. For sanity purposes, most parametres are verified and, if
  97.      in error, will prevent sysevent to start properly,. However, if sysevent
  98.      is already started and some modifications to the configurations files are
  99.      done, depending on the nature of the error, sysvent may exit or not. In
  100.      that case, an error will be recorded using ssssyyyyssssllllooooggggdddd(1m) facility LOCAL0.
  101.      Also, sending a SIGHUP will also tell ssssyyyysssseeeevvvveeeennnntttt to re-read the
  102.      configuration file.
  103.  
  104.      Up to a maximum of 32768 entries ( one per line ) can be entered in the
  105.      configuration file. Lines starting with a '#' are comments. Syntax is:
  106.  
  107.           aaaappppppppnnnnaaaammmmeeee mmmmoooodddduuuulllleeee aaaaccccttttiiiioooonnnn pppprrrriiiioooorrrriiiittttyyyy eeeexxxxpppprrrreeeessssssssiiiioooonnnn
  108.  
  109.      where:
  110.  
  111.      aaaappppppppnnnnaaaammmmeeee
  112.           is the applcation generating the message
  113.  
  114.      mmmmoooodddduuuulllleeee
  115.           is an additional information along with appname
  116.  
  117.      aaaaccccttttiiiioooonnnn
  118.           see ACTION DESCRIPTION
  119.  
  120.      pppprrrriiiioooorrrriiiittttyyyy
  121.           is a string representing the priority.  If prefixed with KERN_,
  122.           KERN_ is stripped.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ssssyyyysssseeeevvvveeeennnntttt((((1111))))                                                        ssssyyyysssseeeevvvveeeennnntttt((((1111))))
  137.  
  138.  
  139.  
  140.      eeeexxxxpppprrrreeeessssssssiiiioooonnnn
  141.           is the rrrreeeeggggeeeexxxx(3g) expression.  It is STRONGLY recommended , for speed
  142.           purposes, to anchor with a ^ at the beginning of  string. Likely, it
  143.           is also recommended to end with a '$' at the end of the string.
  144.           Please enclose everything with double-quotes.
  145.  
  146.  
  147. AAAACCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  148.      Actions can be an internal one when you specify an integer ( 0x format
  149.      accepted ) or a script or a function from within a dso. For a dso, the
  150.      library is opened and closed at each invocation: this allow someone to
  151.      change/test a dso function without actually re-starting ssssyyyysssseeeevvvveeeennnntttt. The
  152.      _n_u_m_b_e_r format is for the sole purpose of ESP implementation.
  153.  
  154.      Each time an action is performed, sysevent _f_o_r_k and perform the action in
  155.      background unless you are using debug mode ( with ----dddd switch). Also, it
  156.      sets the following environment variables:
  157.  
  158.  
  159.      FFFFRRRROOOOMMMMHHHHOOOOSSSSTTTT
  160.           syslogd hostname generating the message
  161.  
  162.      PPPPRRRRIIIIOOOORRRRIIIITTTTYYYY
  163.           If syslogd is running with "-S", priority of the logged message.
  164.           Else, priority of the expression as read from sysevent config file.
  165.  
  166.      PPPPRRRRIIIIOOOORRRRIIIITTTTYYYYCCCCFFFF
  167.           priority as read from sysevent config file
  168.  
  169.      LLLLIIIINNNNEEEECCCCFFFF
  170.           sysevent config file line number
  171.  
  172.      AAAAPPPPPPPPNNNNAAAAMMMMEEEE
  173.           application generating the message
  174.  
  175.      MMMMOOOODDDDUUUULLLLEEEE
  176.           module generating the message
  177.  
  178.      AAAACCCCTTTTIIIIOOOONNNN
  179.           the entire action string
  180.  
  181.      WWWWHHHHEEEENNNN date in ctime(3) format
  182.  
  183.      MMMMEEEESSSSSSSSAAAAGGGGEEEE
  184.           the actual message
  185.  
  186.      NNNNOOOOTTTTEEEE::::           arguments is anything after the 1st comma in sysevent
  187.                      config file. User is responsible to parse it in this
  188.                      script. For example, if they are comma-seperated, you
  189.                      can:
  190.  
  191.                           set -- `echo $* | tr -s ',' ' '`
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ssssyyyysssseeeevvvveeeennnntttt((((1111))))                                                        ssssyyyysssseeeevvvveeeennnntttt((((1111))))
  203.  
  204.  
  205.  
  206.      The action syntax is:
  207.  
  208.  
  209.      iiiinnnntttteeeeggggeeeerrrr
  210.           will internally call "/usr/sbin/esplogger -s $ACTION -m $MESSAGE"
  211.  
  212.      [[[[eeeexxxxeeeeccccuuuuttttaaaabbbblllleeee]]]],,,,[[[[,,,,aaaarrrrgggguuuummmmeeeennnntttt]]]]
  213.           will execute "executable" with optional "argument" ( after the 1st
  214.           comma ).  If 'executable' is empty, the ----aaaa default script will be
  215.           used.
  216.  
  217.      [[[[ddddssssoooo]]]]::::ffffuuuunnnnccccttttiiiioooonnnn[[[[,,,,aaaarrrrgggguuuummmmeeeennnntttt]]]]
  218.           will execute "dso" function with optional "argument" ( after 1st
  219.           comma ).  The argument is passed as a string.  If 'dso' is empty,
  220.           the ----AAAA default dso will be used.  It is illegal to use an empty
  221.           function.
  222.  
  223.      NNNNOOOOTTTTEEEE::::
  224.           _e_x_e_c_u_t_a_b_l_e or _d_s_o MMMMUUUUSSSSTTTT be full pathname, ie. start with a '/'.
  225.  
  226. FFFFIIIILLLLEEEESSSS
  227.       /etc/syslog.conf           some modifications
  228.       /etc/sysevent.config       configuration file
  229.       /usr/local/bin/sysaction   default action script
  230.       /usr/lib/libsysevent.so    DSO containing user-function
  231.                                  callable actions
  232.  
  233. NNNNOOOOTTTTEEEESSSS
  234.      o    The configuration file can be automatically generated using
  235.           ssssyyyysssseeeevvvveeeennnnttttIIIIrrrriiiixxxx(1m). This program reads /usr/lib/sysmon/notifier.config
  236.           file and attempt to buid /etc/sysevent.config file.
  237.  
  238.  
  239.      o    Since the configuration file is mapped in memory using mmmmmmmmaaaapppp(2) call,
  240.           using an NFS-mounted configuration file may cause problems due to
  241.           the stateless nature of NFS.
  242.  
  243.  
  244. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  245.      ssssyyyyssssllllooooggggdddd((((1111mmmm)))),,,, ssssyyyysssseeeevvvveeeennnnttttIIIIrrrriiiixxxx((((1111mmmm)))) ssssyyyysssseeeevvvveeeennnnttttEEEEpppp((((1111mmmm))))
  246.  
  247. AAAAUUUUTTTTHHHHOOOORRRRSSSS////CCCCOOOOLLLLLLLLAAAABBBBOOOORRRRAAAATTTTOOOORRRRSSSS
  248.       Michel Bourget: michel@sgi.com
  249.          ESP(Embedded Support Partner) Project
  250.          Electronic Services/Global Customer Service
  251.          SGI
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.